﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using StevensReceipts.Domain;
using StevensReceipts.Repository;

namespace StevensReceipts.Web.Controllers
{
    public class HomeController : Controller
    {
        //private readonly IRepository<Address> _addressRepository;

        private IReceiptsDataSource _uow;
        public HomeController(IReceiptsDataSource uow)
        {
            _uow = uow;
        }

        public ActionResult Index()
        {
            ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";

            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your app description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }

        public ActionResult Addresses()
        {
            var addresses = _uow.Addresses.GetAll();
            return View(addresses);
        }
    }
}
